<?php
class Model_Config extends CI_Model
{	
	function get($key)
	{
		$this->db->from('setting');	
		$this->db->where('key',$key);
		$query = $this->db->get();
		
		
		return $query->row('value');
		
		
	}
	
	function getSetting()
	{
		
		$this->db->from('setting');	
		$this->db->where('store_id',0);
		$this->db->order_by('store_id');
		$query = $this->db->get();
		
		
		return $query->result_array();
		
		
	}
	
	function getLanguageID($code)
	{
		$this->db->from('language');
		$this->db->where('code', $code);
		
		$query = $this->db->get();
		
		return $query->row('language_id');
	}
	 
}

?>